In resolution conversion of an image, a linear interpolation method (for example, refer to Japanese Patent Application Publication No. H5-219360) and an area average method (for example, refer to Japanese Patent Application Publication No. H5-40825 and Japanese Patent Application Publication No. 2006-270767) are generally applied to the resolution conversion of an image. In the case of a binary image, after resolution conversion, further, a binarization process will be performed by comparing a density of each pixel with a threshold.
FIG. 9 illustrates an appropriate range to which a linear interpolation method and an area average method can be applied.
Although an interpolation method, such as a linear interpolation method, is applied to a high resolution process (expansion) and a minor low resolution process (reduction), there is a problem that a jaggy becomes remarkable when applying a large low resolution processing, such as a fraction of a full size image. Therefore, only when a low resolution processing is performed, the area average method is applied in many cases. On the other hand, although the area average method is advantageous to the low resolution process, smoothing of edge (smoothing) using a high resolution effectively in the high resolution process becomes insufficient.
Then, it will be feasible to create a method for multi-valuing an original binary image by the linear interpolation once, and performing the area average to the result; (interpolation+area average) method. By this method, it becomes possible to complement the both problems, and to obtain a high-definition resolution converted image in some extent regardless of the resolution conversion magnification from a high resolution process to a low resolution process.
FIG. 10 illustrates a flow of a resolution conversion process of a binary image by the (interpolation+area average) method. First, a density at an arbitrary position between pixels (interpolation value) of an inputted binary image of dot-matrix form is obtained and multi-valued with a linear interpolation method (STEP S301).
Next, the density of each pixel of an output image is obtained by re-sampling which uses the area average method (STEP S302). For example, as illustrated in FIG. 11, an input image 311 and an output image 312 after resolution conversion are overlapped so that the coordinates of the pixels of four corners, which are located outsides, are matched. The entire area of the output image 312 is equally divided into areas by the number of pixels of the output image, and a pixel area G is assigned against each pixel of the output image. Then, integration of the interpolation value with respect to the area of the input image which overlaps with the pixel area is preformed with respect to each pixel area G, and the density value of the pixel corresponding to the pixel area is determined by normalizing this integral value by the area of the pixel area. Then, each pixel is binarized by comparing this density value with a predetermined threshold (STEP S303). Here, the center position of the pixel area G is to be the coordinates (an area representation coordinates; a pixel position) representing the pixel area G.
There can be considered some methods for overlapping the input image and the output image in the re-sampling of above-mentioned STEP S302. In the case of the methods of overlapping shown in Example 1 illustrated in FIG. 11, as illustrated in FIG. 12, the correspondence relation of the pixel area of the input image and the output image will be established so that the outside coordinates of the pixels of four corners are matched. A white circle in FIG. 12 denotes the position of each pixel (input pixel) of the input image and a rectangle of a dashed line surrounding each white circle denotes a pixel area (an input pixel area) of the input pixel. A circle onto which hatching has been performed denotes the position of each pixel of the output image (output pixel) and a rectangle of a dot-dashed line surrounding the circle onto which hatching has been applied denotes the pixel area of the output pixel (output pixel area).
When a high resolution process of an integral multiple is performed by setting up such pixel areas, a plurality of pixels, which are equally influenced by the value of a specific pixel of the input image, will be generated. For example, in a two-time (double) expansion, as illustrated in FIG. 13, four output pixels (gray small circles) in the circumference of a black input pixel B become black, which is strongly influenced by the black input pixel B of the center. Four output pixels in the circumference of a white input pixel W become white, which is strongly influenced by the input pixel W of white of the center. Thus, since one original pixel is only expressed with 4 pixels, as shown in FIG. 14, the edge of a slanting line is not smoothed (smoothing). Thus, it is difficult to obtain an effect of the high resolution process.
FIG. 15 illustrates another method of overlapping (Example 2). In Example 2, four corners of an entire image area are set up in the center of pixels located in four corners. That is, the input image and the output image are arranged to be overlapped so that the pixel position of the pixels of four corners of the input image 311 and the pixels of four corners of the output image 312 are respectively matched.
In this case,
To set up a pixel area (which is defined by the coordinate areas in the horizontal direction and the vertical corresponding to a square area, which each pixel occupies.
To set a coordinate area No. k in the range of coordinate value k of −0.5˜k+0.5.
A represent coordinates of the coordinate-area No. k is to be set to “k” which is the center of a coordinate area.
The image area is to be a square area whose peak is to be the center of the pixels of four corners.
The output image is treated the same as the input image.
In the case of Example 2, with respect to the correspondence between the pixel of the input image and the output image, the centers of the pixels of four corners of the input image and the output image are matched respectively as shown in FIG. 16. When the high resolution process of an integral multiple is performed based on the setup of such a pixel area, in the case of binarization, many pixels matching a threshold occurs. Therefore, unstable output pixels are generated in the edge portions, and the phenomenon in which a slanting narrow line becomes thick excessively or becomes thin occurs as shown in FIG. 17. FIG. 17 illustrates an example of high resolution process of 200%.
FIG. 18 illustrates details of a case where high resolution process of 200% is performed based on the setup in Example 2. A white circle in FIG. 18 shows a white pixel of the input image, and a black dot shows a black pixel of the input image. A gray small circle is an output pixel and a rectangle of a dotted line surrounding the output pixel shows a pixel area (integral area) related to the output pixel. Since the integral value of the interpolation value of the pixel area to which a slash has not been given is greatly influenced by the input pixel which exists in the center of the pixel area in FIG. 18, when there is a white input pixel in the center, the pixel area is set white, and when there is a black input pixel, the pixel area is set black so that the pixel are will be stably binarized.
On the other hand, the integral value of the pixel area to which slashed lines are given does not dependent on a specific input pixel, and is influenced almost equally by the surrounding input pixel (for example, when a pixel area 331 is equally influenced by a black input pixel 332 and a white input pixel 333, when being seen in the vertical direction). Therefore, the density, which is obtained by normalizing the integral value becomes easily tend to be near the threshold, and when binarizing, it becomes unstable to become a white pixel or to become a black pixel. As shown in FIG. 17, the phenomenon in which thickness of a slanting line becomes thick excessively, or becomes thin will arise.
An object of the present invention is to provide a resolution converting method, which can obtain a smooth slanting edge and can reproduce a narrow line stably with thickness corresponding to the original thickness when performing a high-resolution process to a binary image of a dot-matrix form, and to solve the above-mentioned problem.